import prisma from "~~/lib/prisma";

export default defineEventHandler(async (event) => {
  const id = getRouterParam(event, "id");
  const body = await readBody(event);
  return await prisma.user.update({
    where: { id },
    data: body,
  });
});
